\(\int (a+b \sec ^2(e+f x)) \sin ^6(e+f x) \, dx\) [8]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 98 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=\frac {5}{16} (a-6 b) x-\frac {(11 a-18 b) \cos (e+f x) \sin (e+f x)}{16 f}+\frac {(13 a-6 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac {b \tan (e+f x)}{f} \]

[Out]

5/16*(a-6*b)*x-1/16*(11*a-18*b)*cos(f*x+e)*sin(f*x+e)/f+1/24*(13*a-6*b)*cos(f*x+e)^3*sin(f*x+e)/f-1/6*a*cos(f*
x+e)^5*sin(f*x+e)/f+b*tan(f*x+e)/f

Rubi [A] (verified)

Time = 0.13 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4217, 466, 1828, 1171, 396, 209} \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=\frac {(13 a-6 b) \sin (e+f x) \cos ^3(e+f x)}{24 f}-\frac {(11 a-18 b) \sin (e+f x) \cos (e+f x)}{16 f}+\frac {5}{16} x (a-6 b)-\frac {a \sin (e+f x) \cos ^5(e+f x)}{6 f}+\frac {b \tan (e+f x)}{f} \]

[In]

Int[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^6,x]

[Out]

(5*(a - 6*b)*x)/16 - ((11*a - 18*b)*Cos[e + f*x]*Sin[e + f*x])/(16*f) + ((13*a - 6*b)*Cos[e + f*x]^3*Sin[e + f
*x])/(24*f) - (a*Cos[e + f*x]^5*Sin[e + f*x])/(6*f) + (b*Tan[e + f*x])/f

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 396

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(
p + 1) + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 466

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x
*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[(a + b*x^2)^(p + 1)*E
xpandToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)]
- (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[
m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 1171

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQ
uotient[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2,
x], x, 0]}, Simp[(-R)*x*((d + e*x^2)^(q + 1)/(2*d*(q + 1))), x] + Dist[1/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1
)*ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] &&
 NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rule 4217

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[x^m*(ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p/(1
 + ff^2*x^2)^(m/2 + 1)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^6 \left (a+b+b x^2\right )}{\left (1+x^2\right )^4} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {a \cos ^5(e+f x) \sin (e+f x)}{6 f}-\frac {\text {Subst}\left (\int \frac {-a+6 a x^2-6 a x^4-6 b x^6}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{6 f} \\ & = \frac {(13 a-6 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac {\text {Subst}\left (\int \frac {-3 (3 a-2 b)+24 (a-b) x^2+24 b x^4}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{24 f} \\ & = -\frac {(11 a-18 b) \cos (e+f x) \sin (e+f x)}{16 f}+\frac {(13 a-6 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a \cos ^5(e+f x) \sin (e+f x)}{6 f}-\frac {\text {Subst}\left (\int \frac {-3 (5 a-14 b)-48 b x^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{48 f} \\ & = -\frac {(11 a-18 b) \cos (e+f x) \sin (e+f x)}{16 f}+\frac {(13 a-6 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac {b \tan (e+f x)}{f}+\frac {(5 (a-6 b)) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{16 f} \\ & = \frac {5}{16} (a-6 b) x-\frac {(11 a-18 b) \cos (e+f x) \sin (e+f x)}{16 f}+\frac {(13 a-6 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a \cos ^5(e+f x) \sin (e+f x)}{6 f}+\frac {b \tan (e+f x)}{f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.42 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.80 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=\frac {60 a e-360 b e+60 a f x-360 b f x+(-45 a+96 b) \sin (2 (e+f x))+(9 a-6 b) \sin (4 (e+f x))-a \sin (6 (e+f x))+192 b \tan (e+f x)}{192 f} \]

[In]

Integrate[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^6,x]

[Out]

(60*a*e - 360*b*e + 60*a*f*x - 360*b*f*x + (-45*a + 96*b)*Sin[2*(e + f*x)] + (9*a - 6*b)*Sin[4*(e + f*x)] - a*
Sin[6*(e + f*x)] + 192*b*Tan[e + f*x])/(192*f)

Maple [A] (verified)

Time = 0.44 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.91

method result size
parallelrisch \(\frac {\left (-36 a +90 b \right ) \sin \left (3 f x +3 e \right )+\left (8 a -6 b \right ) \sin \left (5 f x +5 e \right )-\sin \left (7 f x +7 e \right ) a +120 f x \left (a -6 b \right ) \cos \left (f x +e \right )-45 \sin \left (f x +e \right ) \left (a -\frac {32 b}{3}\right )}{384 f \cos \left (f x +e \right )}\) \(89\)
derivativedivides \(\frac {a \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )}{f}\) \(112\)
default \(\frac {a \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )}{f}\) \(112\)
parts \(\frac {a \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )}{f}+\frac {b \left (\frac {\sin \left (f x +e \right )^{7}}{\cos \left (f x +e \right )}+\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )-\frac {15 f x}{8}-\frac {15 e}{8}\right )}{f}\) \(114\)
risch \(\frac {5 a x}{16}-\frac {15 x b}{8}+\frac {15 i {\mathrm e}^{2 i \left (f x +e \right )} a}{128 f}-\frac {i {\mathrm e}^{2 i \left (f x +e \right )} b}{4 f}-\frac {15 i {\mathrm e}^{-2 i \left (f x +e \right )} a}{128 f}+\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} b}{4 f}+\frac {2 i b}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}-\frac {a \sin \left (6 f x +6 e \right )}{192 f}+\frac {3 \sin \left (4 f x +4 e \right ) a}{64 f}-\frac {\sin \left (4 f x +4 e \right ) b}{32 f}\) \(139\)
norman \(\frac {\left (-\frac {5 a}{16}+\frac {15 b}{8}\right ) x +\left (-\frac {45 a}{16}+\frac {135 b}{8}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+\left (-\frac {25 a}{16}+\frac {75 b}{8}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\left (-\frac {25 a}{16}+\frac {75 b}{8}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}+\left (\frac {5 a}{16}-\frac {15 b}{8}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{14}+\left (\frac {25 a}{16}-\frac {75 b}{8}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}+\left (\frac {25 a}{16}-\frac {75 b}{8}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{12}+\left (\frac {45 a}{16}-\frac {135 b}{8}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{10}+\frac {5 \left (a -6 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{8 f}+\frac {35 \left (a -6 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{12 f}+\frac {113 \left (a -6 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{24 f}+\frac {113 \left (a -6 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{24 f}+\frac {35 \left (a -6 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{11}}{12 f}+\frac {5 \left (a -6 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{13}}{8 f}-\frac {\left (33 a +58 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{2 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right ) \left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{6}}\) \(329\)

[In]

int((a+b*sec(f*x+e)^2)*sin(f*x+e)^6,x,method=_RETURNVERBOSE)

[Out]

1/384*((-36*a+90*b)*sin(3*f*x+3*e)+(8*a-6*b)*sin(5*f*x+5*e)-sin(7*f*x+7*e)*a+120*f*x*(a-6*b)*cos(f*x+e)-45*sin
(f*x+e)*(a-32/3*b))/f/cos(f*x+e)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.88 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=\frac {15 \, {\left (a - 6 \, b\right )} f x \cos \left (f x + e\right ) - {\left (8 \, a \cos \left (f x + e\right )^{6} - 2 \, {\left (13 \, a - 6 \, b\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (11 \, a - 18 \, b\right )} \cos \left (f x + e\right )^{2} - 48 \, b\right )} \sin \left (f x + e\right )}{48 \, f \cos \left (f x + e\right )} \]

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^6,x, algorithm="fricas")

[Out]

1/48*(15*(a - 6*b)*f*x*cos(f*x + e) - (8*a*cos(f*x + e)^6 - 2*(13*a - 6*b)*cos(f*x + e)^4 + 3*(11*a - 18*b)*co
s(f*x + e)^2 - 48*b)*sin(f*x + e))/(f*cos(f*x + e))

Sympy [F(-1)]

Timed out. \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=\text {Timed out} \]

[In]

integrate((a+b*sec(f*x+e)**2)*sin(f*x+e)**6,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.13 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=\frac {15 \, {\left (f x + e\right )} {\left (a - 6 \, b\right )} + 48 \, b \tan \left (f x + e\right ) - \frac {3 \, {\left (11 \, a - 18 \, b\right )} \tan \left (f x + e\right )^{5} + 8 \, {\left (5 \, a - 12 \, b\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (5 \, a - 14 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{6} + 3 \, \tan \left (f x + e\right )^{4} + 3 \, \tan \left (f x + e\right )^{2} + 1}}{48 \, f} \]

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^6,x, algorithm="maxima")

[Out]

1/48*(15*(f*x + e)*(a - 6*b) + 48*b*tan(f*x + e) - (3*(11*a - 18*b)*tan(f*x + e)^5 + 8*(5*a - 12*b)*tan(f*x +
e)^3 + 3*(5*a - 14*b)*tan(f*x + e))/(tan(f*x + e)^6 + 3*tan(f*x + e)^4 + 3*tan(f*x + e)^2 + 1))/f

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.06 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=\frac {15 \, {\left (f x + e\right )} {\left (a - 6 \, b\right )} + 48 \, b \tan \left (f x + e\right ) - \frac {33 \, a \tan \left (f x + e\right )^{5} - 54 \, b \tan \left (f x + e\right )^{5} + 40 \, a \tan \left (f x + e\right )^{3} - 96 \, b \tan \left (f x + e\right )^{3} + 15 \, a \tan \left (f x + e\right ) - 42 \, b \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{3}}}{48 \, f} \]

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^6,x, algorithm="giac")

[Out]

1/48*(15*(f*x + e)*(a - 6*b) + 48*b*tan(f*x + e) - (33*a*tan(f*x + e)^5 - 54*b*tan(f*x + e)^5 + 40*a*tan(f*x +
 e)^3 - 96*b*tan(f*x + e)^3 + 15*a*tan(f*x + e) - 42*b*tan(f*x + e))/(tan(f*x + e)^2 + 1)^3)/f

Mupad [B] (verification not implemented)

Time = 18.47 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.07 \[ \int \left (a+b \sec ^2(e+f x)\right ) \sin ^6(e+f x) \, dx=x\,\left (\frac {5\,a}{16}-\frac {15\,b}{8}\right )-\frac {\left (\frac {11\,a}{16}-\frac {9\,b}{8}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^5+\left (\frac {5\,a}{6}-2\,b\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {5\,a}{16}-\frac {7\,b}{8}\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^6+3\,{\mathrm {tan}\left (e+f\,x\right )}^4+3\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}+\frac {b\,\mathrm {tan}\left (e+f\,x\right )}{f} \]

[In]

int(sin(e + f*x)^6*(a + b/cos(e + f*x)^2),x)

[Out]

x*((5*a)/16 - (15*b)/8) - (tan(e + f*x)^3*((5*a)/6 - 2*b) + tan(e + f*x)^5*((11*a)/16 - (9*b)/8) + tan(e + f*x
)*((5*a)/16 - (7*b)/8))/(f*(3*tan(e + f*x)^2 + 3*tan(e + f*x)^4 + tan(e + f*x)^6 + 1)) + (b*tan(e + f*x))/f